package com.weifeng.learneasyexcel.readexceldemo;

import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.weifeng.learneasyexcel.util.configlog;

import java.text.SimpleDateFormat;
import java.util.List;

public class ReadExcelDemo {
    public static void main(String[] args) {
        new configlog();
        String fileName = "C:\\Users\\Administrator\\Desktop\\07版.xlsx";
        reaad(fileName);
    }

    public static void  reaad(String fileName){
        List<Exceluntity> list = EasyExcel.read(fileName).head(Exceluntity.class).sheet().headRowNumber(1).doReadSync();
        for (Exceluntity e :list){
            System.out.print(e.getBiaoti()+" ");
            String format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(e.getRiqi());
            System.out.print(format+" ");
            System.out.println(e.getShuzi());
        }
    }


}
